<%@ include file="/WEB-INF/tiles/include.jsp"%>

<script type="text/javascript">
	$(document).ready(function($) {
		$("#modalbox_save").click(function() {
			$.wis.util.doSave()
		});
	
		$("#facebox_close").click(function() {
			$.facebox.close()   
		});
	
	});
</script>

<form:form id="editForm" commandName="commandUser" method="post" action="${pageContext.request.contextPath}/basic/admin/user.save">
	<form:hidden path="pgIndex"/>
	<form:hidden path="pgRows"/>
	<form:hidden path="pgTotal"/>
	<form:hidden path="id"/>
	<form:hidden path="strAction"/>

<table class="tableInput">
	<tr>
		<th class="field"><spring:message code="label.userId"/>&nbsp;:</th>
		<td class="even">
			<c:choose>
				<c:when test="${not empty commandUser.id}">
					<b>${commandUser.userId}</b>
					<form:hidden path="userId"/>	
				</c:when>
				<c:otherwise>
					<form:input path="userId" size="36" maxlength="36"/>		
				</c:otherwise>
			</c:choose>
			
		</td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.password"/>&nbsp;:</th>
		<td class="odd"><form:password path="password" showPassword="true" size="32" maxlength="32"/></td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.verifyPassword"/>&nbsp;:</th>
		<td class="even"><form:password path="verifyPassword" size="32" maxlength="32"/></td>
	</tr>		
	<tr>
		<th class="field"><spring:message code="label.role"/>&nbsp;:</th>
		<td class="odd">
			<form:select path="roleId">
				<form:option value=""></form:option>
				<form:options items="${commandUser.roleCB}"
					itemValue="stValue"
					itemLabel="stLabel" />
			</form:select>
		</td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.loc"/>&nbsp;:</th>
		<td class="odd">
			<form:select path="locId">
				<form:option value=""></form:option>
				<form:options 
					items="${commandUser.locCB}" 
					itemValue="stValue"
					itemLabel="stLabel" />
			</form:select>
		</td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.ipAddress"/>&nbsp;:</th>
		<td class="even"><form:input path="ip" size="32" maxlength="32"/></td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.issso"/>&nbsp;:</th>
		<td class="odd"><form:checkbox path="issso" /></td>
	</tr>
	<tr>
		<th class="field"><spring:message code="label.passwordstatus"/>&nbsp;:</th>
		<td class="even"><form:checkbox path="passwordStatus" /></td>
	</tr>
</table>
<table class="tableButton">
	<tr><td align="left">
		<span class="button"><a href="#modalbox_save" id="modalbox_save"><spring:message code="button.save"/></a></span>
		<span class="button"><a href="#facebox_close" id="facebox_close"><spring:message code="button.cancel"/></a></span>
	</td></tr>
</table>
</form:form>